package test;

import java.util.ArrayList;

public class lst implements Iterator {

    ArrayList i;

    public lst() {
        i = new ArrayList();
        this.i.add("SS");
        this.i.add("SfdsS");
        this.i.add("SfdsS");
        this.i.add("SSfdsa");
        this.current = 0;
    }
    int current;

    @Override
    public boolean hasNext() {
        if (current > i.size() - 1 || i.get(current) == null) {
            return false;
        } else {
            return true;
        }
    }

    @Override
    public Object next() {
        return i.get(current++);
    }
}
